package com.gy.niuer.mapper;
import org.apache.ibatis.annotations.Param;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.gy.niuer.domain.Patient;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @Entity com.gy.niuer.domain.Patient
*/
@Mapper
public interface PatientMapper extends BaseMapper<Patient> {

    int insertAll(Patient patient);

    List<Patient> selectAll();

    Patient selectOneById(@Param("id") Integer id);

    @Select("insert into patient(name,id_card,phone,state) " +
            "values(#{name},#{idCard},#{phone},#{state})")
    void addPatient(Patient patient);
}
